projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
165a4a0
)
[XEN] Wrap compat XLAT_ macros in "do { } while (0)".
author
Tim Deegan
<Tim.Deegan@xensource.com>
Thu, 1 Feb 2007 13:14:43 +0000
(13:14 +0000)
committer
Tim Deegan
<Tim.Deegan@xensource.com>
Thu, 1 Feb 2007 13:14:43 +0000
(13:14 +0000)
This unbreaks code like
if ( !IS_COMPAT(dom) )
memcpy();
else
XLAT_foo();
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/tools/get-fields.sh
patch
|
blob
|
history
diff --git
a/xen/tools/get-fields.sh
b/xen/tools/get-fields.sh
index ccf5675c02b8c1865852cc519a7120c762082fc0..0936bb8fe3139e227f6821b023e8a7d56728c249 100644
(file)
--- a/
xen/tools/get-fields.sh
+++ b/
xen/tools/get-fields.sh
@@
-227,7
+227,7
@@
handle_array() {
build_body() {
echo
- echo -n "#define XLAT_$1(_d_, _s_)"
+ echo -n "#define XLAT_$1(_d_, _s_)
do {
"
local level=1 fields= id= array= arrlvl=1 array_type= type= token
for token in $2
do
@@
-303,6
+303,8
@@
build_body() {
esac
test -z "$fields" || fields="$fields $token"
done
+ echo " \\"
+ echo "} while (0)"
echo ""
}